package com.cha.chaApp.family.controller;

import com.cha.chaApp.family.service.FamilyService;
import com.cha.chaCommon.core.common.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/family")
public class FamilyController {

    @Autowired
    private FamilyService familyService;

    @GetMapping("/getFamilyInfoByUserId")
    public R getFamilyInfoByUserId(Long userId){

        return R.ok(familyService.getFamilyInfoByUserId(userId));

    }
}
